package queue;

import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);//加入队列
        queue.offer(2);
        queue.offer(3);
        int val = queue.poll();//出队列
        System.out.println(val);
        System.out.println(queue.peek());//查看队头的元素

    }
}
